package com.bestcem.xm.om.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.om.entity.OmIndustry;
import com.bestcem.xm.om.grpc.v1.services.GetIndustryContactResponse;
import com.bestcem.xm.om.grpc.v1.services.Industry;
import com.bestcem.xm.om.grpc.v1.services.IndustryInfo;
import com.bestcem.xm.om.service.dto.SampleCodeDTO;

import java.util.List;

/**
 * OmIndustryService
 *
 * @author YiFang <yifang.zhang@idiaoyan.com>
 * @version v1.0
 * @date 2022/9/12 18:05
 */
public interface OmIndustryService {

    /**
     * insert
     * @param omIndustry
     * @return
     */
    ServiceResult<String> insert(OmIndustry omIndustry);

    /**
     * findById
     * @param id
     * @return
     */
    ServiceResult<Industry> findById(String id);

    /**
     * updateById
     * @param omIndustry
     * @return
     */
    ServiceResult<String> updateById(OmIndustry omIndustry);

    /**
     * deleteById
     * @param id
     * @return
     */
    ServiceResult<Integer> deleteById(String id);

    /**
     * selectByIds
     * @param ids
     * @return
     */
    ServiceResult<List<Industry>> selectByIds(List<String> ids);

    /**
     * findByDistrictAndIdOrCode
     * @param district
     * @param id
     * @param code
     * @return
     */
    ServiceResult<GetIndustryContactResponse> findByDistrictAndIdOrCode(String district, String id, Integer code);

    /**
     * findByCodeOrRouteOrIp
     * @param industryCode
     * @param industryRoute
     * @param ip
     * @return
     */
    ServiceResult<IndustryInfo> findByCodeOrRouteOrIp(Integer industryCode, String industryRoute, String ip);

    /**
     * listIndustries
     * @param id
     * @param code
     * @param name
     * @param order
     * @return
     */
    ServiceResult<List<Industry>> listIndustries(String id, Integer code, String name, Integer order);

    /**
     * listIndustrySampleCode
     * @return
     */
    ServiceResult<List<SampleCodeDTO>> listIndustrySampleCode();
}
